split event listener to separate class