Final Version of Code and Graphs