implement function: update task