making popover more dynamic