query parsing enhancements