- some refactoring
- extended mode switch working