updates hostname and ip retrieval to use basic library functions