Working on dialog api