test code
input tail - emit event