add locks to all writes/deletes