added ons capability, fixed inheritance from event emitter