Recursion script updated