Implemented matrix multiplication