Add a lock method
Merge pull request #42 from austenke/master

Add a lock method