EventService code modified