improve logic and ipv4 finding