added the working code for the url shortener