Adapted to new graph, new structure and 3D terrain