enhancements to query class