added locking and unlocking states