improve speed and implement the extrapolation, regarding matrix sparsity