trying out optical flow. still has a bug