added improved lock example
added read-write lock example