Updated Matrix Multiplication Resolved to get correct output