Complete a Task function is working