dialog box for matching and some other changes