a toy/naive gen_event. the most diffcult part is gen_event:xxxx methods.