made host a parameter to the client