fixes ipv6 issue and improves library