testing the path algorithm