sorted the documents by state and temperature, then iterated through each one performing a callback which stores the document in an array if its the month high, then iterates through that array of documents and updates each of them in the database