added dot product infrastructure