Created Overload Method for deleteTask()