implementation of SimpleLock and ComboLock