Add input index tracking
Add reduce event trigger