prepare graph for pagerank - no dangling info