refactoring+cleaning