refactoring product list sorting