         
         if experiment.trafficAllocation.count == 0 {
             // log error if there are no traffic allocation values
-            logger?.log(level: .error, message: String(format:"Experiment %@ has no traffic allocation", experiment.key))
+            logger?.log(level: .error, message: "Experiment \(experiment.key) has no traffic allocation")
 
             return nil
         }

                }
                else {
                    // log problem with experiment id
                    logger?.log(level: .error, message: String(format:"Experiment Id %@ for experiment not in datafile", experimentId))
                }
                return experiment;
            }
        }
        
        // log error if invalid bucketing id
        logger?.log(level: .error, message: String(format:"Bucketing value %d not in traffic allocation", bucketValue))

        return nil
    }

        }
        
        // log error if invalid bucketing id
        logger?.log(level: .error, message: "Invalid bucketing value for experiment \(experiment.key)")

        return nil;

