add-legent - removed sorting code