graph impl