third refactoring