adding communication between server and client