moved preventDefault()