update before script