update signedmatrix
update raw2flag