Completed method for deleting a task