refactoring corrections