Implemented new_bst function