creates a switch for hostname