handling deleting of tasks on the list