added the button functionality for storing al the values of the inputs in a 2d array