changed to text serialization