as a while() loop