[UPDATE] created query superclass. Extended API.