slight changes to sum of paths