update before publish