updated the update action in the task controller and added a create action