Added adjust ttl function