Changed interface of dotProduct