added event handler for button to receive input and close pop up