a few updates in the method of difference between frames