updated parser to handle query data