parse query directly