Better code for looking for local ip address