updated acquiring ip method