updating stepper script to work as context manager, unfinished