factored out embedded host