replacement of host.c done - this code is not compiling yet!