added support for abstract queries