get the ip automatically