added support for raw queries