correct javascript