for task 4: add the pagerank and modify the spanning tree