task delete method modification