before javascript update