created a sort_tasks and print_task function for the Task class