new border check algos