refactoring and classification