added some more comments

for better readability
reconstructed codes for making graph data