implemented structured query parser