converted remaining synchronized blocks to use the read/write locks