remove unnecessary newline
added getIP method