refactoring of the do_step output