update code for Minesweeper