basic for loop

beware of infinite loops