implemented graphs tut.