added serialization support for persistence