private Graph constructor & getStep