minor modification of tests on matrix