Using class to manage popovers