mac and hostname should be str