update protocol to use gen fsm