fixed some new read write functionality.