add locking feature