added isLocked()