repair before replace