To repair or replace: how can you decide?