code improvement for setting remote IP
code improvement for setting remote IP