add function to get the ip of the machine