Added support for batch queries