tentative final version, path_finder.rb