Updated JavaScript