action listener to store number to memory