improved pagerank script