some refactoring 2