minor optimization for abstract vectors
adding dot product