I can't work out what this function is for. It looks strange.