refactoring and divide into epl, event, listener