Improved recursion speed