while loop class