updated checkBoard method