add a class rwlock