added support for insert queries