Initial Version of a State Machine