completed indexing, added query processing