added dot product method