use slightly more configurable query interface