Added necessary variables in the recursion.