format showPopup method only