change half of the cold to sparse matrix