correct javascript?