Refactored OCR into own method