move creating the eventEmitter instance to constructor since otherwise all Task instance will share the same eventEmitter instance.