Remove recursion for clarity