before transform huf-tree separelly