added comments from ben et al
graph generation and stuff