inherit from eventemitter to emit error and success events