need to fix struct_mat