Create Model State Machine