iteration and extraction in Graph