added not particularly elegant query string passing