Copy of ToDo with function for sorting