deleted lib and added event emitter to index.js