added support for query parameters