replaced internal indexing by UnitIndex and Event