changed ll to use read/write locks, and applied the changes throughout