delete task function working