use histogram diff algorithm