try with thread local storage for base position