make dialog work