modified for graph limit