refactoring changes for abstraction