convert to RWmutex