update tooltip and popover code