make threadsafe
remove metaprogramming for threadsafe accessors