public int getPrice(String itemName, int command){
        final String AVERAGE = "average",LOW= "recent_high", HIGH="recent_low";
        String item = format(itemName),extracted;
        int price = 0;
        openStream(item);
        extracted = retrieveData(item);
        switch (command){
            case 1:
                return parseInfo(extracted,LOW);

            case 2:
                return parseInfo(extracted,AVERAGE);

            case 3:
               return parseInfo(extracted,HIGH);
        }
        return price;
    }