Added ttl functionality