added function to shorten URLs