first bst implementation