Added code for popovers