changes to showPopUp and hidePopUp