Fixed pagerank example algorithm to new api