introduce emit on mechanism

show you how to use sandbox.emit and sandbox.on