partially finish the pattern tree.