graph class done