locked and unlocked functionality works