add index in events