build filteredBST