reworked listener pattern