control tree implementation