move locks to common place
Merge pull request #13 from rexposadas/pr/12

move locks to common place