Recursive search implemented.