implemented type 2 graphs