making recursiveSolve public