revised interaction between server and client