updated code so that multipart names are unique (to conform to RFC)