implemented reentrantReadWriteLock

see above