changed update function for task