Merge pull request #24 from assureit/searchengine

refactor a code and eliminate redundant part
fixed error