main now runs test_mat and prints results