update before JS