second round of changes into host.c