shorter code
add idna support