updated distance criteria