internals of popover controller working