output_result() works, output in matrix form