added enter states
added handshake constants