prototype for locking