fixing stitching algorithm and adding ocr