add dialog functions
Merge pull request #21 from julienj/add-dialog

add dialog functions