added legend into pic and removed the todo