nit: it's a standard that we generally name all anonymous functions, but I see that we've been landing without this recently. I won't block the review on this, though we may want to go through and give these functions names.