initial implementation of the full search engine