corrections after refactoring