the element var in the for loop should be renamed to path