better domain name parsing