add a read/write lock