fixed some errors and the graph