bounded while loop