read_data and write_data implemented