create method to delete task