changes + refactoring