some forgottten changes
done with reentrantreadwrite