added support for query parms -- the right way