use graph structere