add tests, use inet_pton instead of inet_addr