new version of the program with sending message from  server to client