diameter functional