modufied mathematica scripts for convergence study