refactoring of smij