Added thinking recursively.