correct Javascript syntax