read and write by chr