@Override
    public void reduce(String key, Iterable<String> values, Context context) {
        int num = 0;
        for(String value:values){
            num += Integer.parseInt(value);
        }
        if(DEBUG && debugCount == 50) {
        	try {
				//50 ms delay for every 50 reductions
				Thread.sleep(50);
			} catch (Exception e) {
				
			}
        }
        
        context.write(key,Integer.toString(num));
    }