The output routine needs to know which step that has been taken in the past (to arrive at this result), not which step to take next going forward.