added loop for files to get