read and write tests pass