- some of the locking code filled in