found the problem: equal_range
fixed equal_range bug, still got runtime errors
finally fixed the runtime errors, tree is slow