Completed! Except the graph plotting