last changes from refactoring