refactoring: a bit