exercise 4-1: echo server