revise bst_well_formed? to be more elegant