Attempting to get itteration to lock/unlock

Is this working properly? More testing required.