added algorithm to shorten addresses to maximum address field length