The loadBPTree function works now.