def extend(old, newlow, w=8): mask = (1< maxdelta: return candidate2 else: return candidate1