changed globals.domain to currentHostName everywhere it needed to be updated