Dot product function added.