add index for events