added code to read the number of files