copied all host functions to switch