todo list sort function.