moved url.substr(1) into getUrl to be cleaner