edit function is optional
two separate examples
starting to emit events for different step completions