usage of read and write.