changed how hostname is determined