added solve.rb as a helper file for route finding algorithm