rudimentary step function in place, kind of clunky but it works.