added optical flow and background subtraction