dhmm corrected and no spare sparse matrix is used