adding ";" and state machine