updated republish script