rewrite record to string and for event tests