refactoring and clean