added locking and unlocking to ticket machine, added tesseract methods