verified that search is working, remove debug code