update so only when needed js