handshake now working

needs error checking though