update ttl calculation