- some refactoring