refactoring for future extension