adding betweenness calculations for JSON output, albeit correctly this time