define get_listeners in scope so it can be called privately by notify