added maximum distance field