remake branchBound - nearly done