public JSONArray generateData(Date start, int n, double mean, double from, double to, int outlierProbability, double multiplicator){
		
		// empty jsonarray
		JSONArray array = new JSONArray();
		
		String timeStamp = utils.sqlDateToCosmString(start);
		// generate time stamp
		//String timeStamp = utils.getCurrentTimeAsString();
		//timeStamp = timeStamp.substring(0, timeStamp.length()-1)+".000000Z";
		
		
		// loop that generates values
		for (int i=0; i<n; i++){
			
			//Is value an outlier?
			boolean isOutlier = Math.random()*100 <= outlierProbability;
			
			
			double value = 0;
			if (isOutlier){
				// low or high value outlier
				boolean high = Math.random() >= 0.5;
				if (high) {
					// decrease upper border
					value = to-Math.random()*multiplicator;
				} else {
					// increase lower border
					value = from+Math.random()*multiplicator;
				}
					
			} else {
				value = mean+Math.random()*multiplicator;
			}
			
			//System.out.println(value);
			
			// round to three decimal places
			value = Math.floor(value * 1000) / 1000.0;
			
			// generate jsonobject and add to jsonarray
			try {
				JSONObject obj = new JSONObject();
				obj.put("value", value);
				// add five seconds to timestamp
				Date date = utils.overlongTimestampToDate(timeStamp);
				date = utils.addMinutes(date, 5);
				timeStamp = utils.sqlDateToCosmString(date);
				obj.put("at", timeStamp);
				
				array.add(obj);
			} catch (java.text.ParseException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			
		}
		
		//System.out.println(array.toJSONString());
		return array;
		
	}