add order to query parsing