Updated script to test with ip addresses