added management of query parameters as per issue #6