separating out query string construction from reverse routing