some changes to suit needs for popover