use hostname instead of HOSTNAME because of sytem portability