add lock functionality
Merge branch 'temp'