looping through datasets