// begin refacto of product js