element-of-set via binary tree