optimize base class Popup