update the board width and height