better script, adding printing
added convergence test
complete sqrt