removing external ip -- having trouble with newline