add adding-host back-end code