debugging stepper function