taking a look at a clearer way to do while loops