EXAMPLE: Implemented the read and write functions