replaced hacky popovers with modal dialogs