MS3 version
- added makeshift state switching