working on dot product for matrices