Add check isNearDistance logic