Created a global variable for the board and edited for loop