refactoring classes