refactor popovers