added support for parameterised queries