deleted second instance of dialog for macrofunctionality.