changes to publish.js