add tests for minv and mmul