Changed ip getting method