unnecessary code removed
reuse popup if it is already shown to avoid blinking