added legend to graph
fixed typo