change to use diaglog