refactoring for expansion