text serialization fixed and test for reading/writing array of non-PODs added