Realised my mistake in click event for buttonGrid

the click event currently only works for the last button created, I
think to fix this I have to add all the created buttons into an array,
or somehow make the event handler work for all the buttons.