Refactoring to_product method