made the hostname shortener smarter