altered js
further modification of basis for product addition