if to while. everything uses $arg