now loops through files