echo server, slightly modified