Graph factory improved