Add comments that explains what these `for` loops are doing.