adding script to calculate how dense the graph is