added dot product method to do multiplication of vector x vector