updated pop up window when button is clicked