while loop can handle arbitrary arguments