updated publish sciprt