add some reading and rw locks.