extract tree component to module