repaired code