set _h_matrix properly