removed redundant formatUrl() conditional