use mutex instead of shared_mutex