javascript corrected