added compare function and toDoList functions