added communication between client and server