implemented simple socket-based echo server for testing