update task and adapter