refactoring on the way