adding functions to sort the todo lists by date