private void addInOrder(ArrayList<Long> timestamps, ArrayList<Double> values, long timestamp, double value){
		for (int i = 0; i < timestamps.size(); i++){
			if (timestamps.get(i) > timestamp){
				timestamps.add(i,timestamp);
				values.add(i,value);
				return;
			}
		}
		timestamps.add(timestamp);
		values.add(value);
	}