major updates to read write.