changed window to dialog