improved SimpleLock