_write_event and _write_record are unnecessary. they are both one-line and called only once. do not abstract unless there is a good reason, e.g., remove duplication, make things clearer. otherwise, it's indirection--which has cost (cognitive overhead)--with no benefit