popover view refactor