List sorting mechanism