Updated print_mat