small refactoring

ready for adding SS mode