emit event in controllers