simplify event serialization