changed parameterOrder in getPathBetween