started exercises from chapter 2, all in Graph.py