implement Tree and Option.