add least mean square value + allow the script to print multiple charts