added test for while statement