add WritingEvents sample