removed EventEmitter dependency, refactored to use simple callbacks