for and while work