adding dot product