took a different approach to fixing the get url function