added support for other queries