add read write lock support