add a working dialog for key generating function