minor changes to do_task