check board function