started converting to OpenCV