fixing test case for printing a matrix