added communication protocols for server and client