refactor method public_ip -> ip
remove public_ip