updated stepper and timer code