fixed product function to pass test/product