Adding dialog api