Adrian's version of Binary Tree Builder