separate repair function .