change method for retrieving IP