updated code for products api