repaired sorted