implement the read and write operations in the driver