construct query parser manually