added serialization and deserialization to interface