added serialization and deserialization of the score