isn't is much simpler to use a modulo counter (forgive me for the ascii art): [bang] | | +--+ [float] | | | [+ 1] | | | [% 4] | | | +--------+ | 0,1,2,3,0,1,2,3,...