remove dependency on bst