got the basic methods in place for finding the most profitable path.