added dialog and trigger
docs and comments