added parsing functionality and storing of query terms in a data structure