package lookup;

import java.util.Optional;

import com.twilio.Twilio;
import com.twilio.rest.lookups.v1.PhoneNumber;

public class Lookup {
    
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        if(args.length == 0) {
            throw new IllegalArgumentException("Missing command line argument.");
        }

        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        String lookup_number = args[0];

        PhoneNumber number = PhoneNumber
            .fetcher(new com.twilio.type.PhoneNumber(lookup_number))
            .setType("carrier")
            .fetch();

        System.out.println("Carrier name: " + number.getCarrier().get("name"));
        System.out.println("Number type: " + number.getCarrier().get("type"));
    }
}
@@ -14,36 +14,8 @@
 p;%0A%0A
-import java.util.Optional;%0A%0A
 impo

remove unnecessary import