refactoring product_service.js