similar products refactoring