make the test case smaller
small changes
some tools for random matrices