server side code for COMMUNICATE