read/write with the api