Refactored ttl into an attribute