different file looping code