max duplicate distance