solution to sinatra url shortener