updating client to deal with messages from server.