add template of matrixMultiply