added support for locking keys