public void reduce(Text key, Iterable<Text> values, Context context) throws IOException, InterruptedException {
        String[] split;
        float sumShareOtherPageRanks = 0;
        int N = 1;
        float originalRank = 0;
        String links = "";
        String pageWithRank;
 
        Iterator<Text> it = values.iterator();
        while(it.hasNext()){
            pageWithRank = it.next().toString();
            if(pageWithRank.startsWith("!")) {
            	originalRank = Float.valueOf(pageWithRank.substring(1));
                continue;
            }
            if(pageWithRank.startsWith("|")){
                links = pageWithRank.substring(1);
                continue;
            }          
            if (pageWithRank.startsWith("c")) {
            	N = Integer.valueOf(pageWithRank.substring(1));
            	continue;
            } 
            split = pageWithRank.split(conf.splitter);
            float pageRank = Float.valueOf(split[0]);
            int countOutLinks = Integer.valueOf(split[1]); 
            sumShareOtherPageRanks += (pageRank/countOutLinks);
        } 
        float newRank = damping * sumShareOtherPageRanks + (1-damping) * originalRank / N;
        context.write(key, new Text(newRank + "\t" + links));
    }