wokring example of while loops