first implementation of the event system