moved some functionality into the ip class