fixes after refactoring