Passing listeners as parameters