some refactorings 2