btree select prototype