implement and test the select method of a binary search tree