implemented a working echo server