better use of recursion stack