added simple lock