Added the add task function