BST with generic type