this uses modulus if the function would loop too many times Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>