added an example of using a Lock