query update task function