improved binarysearchtree
's correct method