shouldn't you get the writeLock here?