update task handler code