added test code to search