added searcher class and fixed some bugs