reintroducing while loop