ttl refactoring