Added a ttl loop