latest changes before major refactoring