better board boundary detection