Graph factory :(