refactoring cleanup