Got rid of the first piece of the 2d array I had. Replaced it with the variable N. Also changed the default behavior of the next and previous button to decrement the n value and then set text. Then increment it back.