refactoring commonilize