added matrix multiplication function uses matrix of pointers