ipaddr resolve moved to separate func