added sendEvent