adapt to restructure from treww