started ruby reimplementation
added handshake stuff