checkin state machine