refactor to remove ThreadLocal.initialValue.