todo build graph