state machine and camera io core