changes in mainscript