Modifying graph class