helper methods and handshaking