using event emitter, not really working though...