some refactoring
...