changed design
handshake redone
using sockets instead of channels