added stopping a branch early if pointless.