change the get ip method