graph algorytmes plus tests