some refactorings
refactoring