Sketch out the state machine protocol