add options to decide the hostname replacement