added emit and trigger