add isLocked method