automatized to iterate over files