Instead of callback functions use event subscriptions