Added graph2 code.