removed ThreadStatic dependency
internal changes