FIXED + ADDED: handshake abstraction layer