Convert into bst