repaired template