use url.parse and url.format to build the key instead of string concatenation