a much more interesting step function that pulses pins and manages timing better