version 2.4. faster, less locking, more robust