Seems like this is out of date, as totalUpdates is 2014 and you select a random doc each time around the loop?