Added update code to host.cpp