added unit tests for recursive search and modified recursive search