modified selection dialog. modified fun