usage of new write/read functions example