setting target from dialog