action listener to display memory