dynamically generating the popups