needed to move require statements into loop to run for each of the files.