changed dot product for hashing