first refactoring class inherit