implementing dot product
implementing tensor dot product