initial code for epoch related events

It does not work yet, I just want to get some early feedback. I will work on the test if this point to right direction.
fixed.