refactoring class-system