added threadsafe_dereference