add handshake serialization