update when JS is inserted