while loop

changed flip from for loops for everyone to half while loops.  this
should fix the flipping stopping short