added hostip function