Read and write functions added.