remake branchBound - nearly done 2