updated class with OpticalFlow