reverse recursion methods rewritten.
reverse recursion methods rewritten.