Added commented code for the locking...