clean up parsing of IP addresses to not count on the memory being reused and instead copied into datastructure