Dialogue manager improved

Callback function is added.