put dialog in a runonuithread