add test on random matrix