Use events.

Issue #213