first attempt at locking the writes.