binary tree for general structure.