changes to do_rep working towards using task_rep for it