Missing a `step_no = step_no + 1` before the `prettyprint()`?