Added the recurse function.