build graph on all cases