repair head implementation