supports onDemand state with redirecting