Implemented locking