while changed by recursion