fixed print_mat reference and changed some names

test_mat works properly