added initial server echo handling code.