added update method to tasks controller