just some refactoring: