heap stubs, binsearch fn