reading and writing fixed