new script fix trainGraph