move immediate protocol state transitions to a wrapper function