speed up on graph helper