repaired encoding