change the locking method