refactoring: extracted classes