sort list reimpl