add support for generic queries