add chessboard reading code