refactor to enable faster warmup