included a for loop to run the function for all datasets and sites
daily work