changed dha dependence from matrix to rows