tree construction