prototype to detect board grid