added ttl and refactored a bit the building of the url - happy hacking with cond->