Added a new function based off suave using bsearch to find upper k

... in my testing runs slower than the original decrementing k suave
function