Adding a lock