Integrating the event handling with in engine