refactoring of classes