I think I follow what this is doing, but an explanatory comment would be useful.