Putting input into an array

I've created a java program with an array of 7 numbers. the first number indicated how many numbers will be entered.
for ex. 6, 202, 303, 101, 303, 505, 404
I created an array with the above examples number, and all my methods are working to compute the average, values equal to average, below average and above average.
However, right now its not quite right because ive entered the numbers into the array manually. What i need to do is take the numbers from the input stream and enter them into the array. How do I do this? Ive been doing so much research and can't figure out how to do it/get it right.
// shortcut, creates array manualy. need to change this to take the numbers from the standard input stream.
int[] numbers = { 6, 202, 303, 101, 303, 505, 404};
// position 0 holds how many numbers there are
int howMany = 0;
howMany = numbers[0];
// average numbers in array
int numHolder = 0;
int average = 0;
int add = 0;
for (int i = 1; i<numbers.length; i++) {
    add = numbers[i] + add;
    average = add / howMany;
// number of integers that is less than the average
int lessThan = 0;
for (int i=1; i<numbers.length; i++){
    if (numbers[i] <  average) {
        lessThan ++ ;
// number of integers exactly equal to the average
int equal = 0;
for (int i=1; i<numbers.length; i++){
     if (numbers[i] ==  average) {
     equal ++ ;
// number of integers that greater than the average
int greaterThan = 0;   
for (int i=1; i<numbers.length; i++){
    if (numbers[i] <  average) {
        greaterThan ++ ;
// print the results
System.out.println("Average Value : " + average + "\n");
System.out.println("Number of values below the average : " + lessThan);
System.out.println("Number of values equaling average  : " + equal);
System.out.println("Number of values above the average : " + greaterThan + "\n");

BufferedReader buffy = new BufferedReader(new InputStreamReader(System.in));
String input = buffy.readLine();   
int num = Integer.parseInt(input);
array[somenumber] = num;You should have try/catch statements so the program does not let the client enter strings.
Hope this helped

Similar Messages

  • Making a jframe that i can put input into....

    hey guys i was wondering if i could have a very easy beginer code sample ofr making a small jframe that i can put input into....and can we display our own home written code on the forums i checks the conduct thingy but it didnt say...tyvm for the help
    System.out.println("JAVA FOR LIFE!!!");

    [http://java.sun.com/docs/books/tutorial/uiswing/index.html]

  • Need help in putting data into 2d array

    My input file :
    1 , 2 , 1
    2 , 2 , 1
    3 , 3 , 1
    4 , 2 , 2
    2 , 3 , 2I'm stuck at:
    while( reader.readLine() != null){
    String Matrix[] = line.split(",");
    }Means I only can read how many lines there. For 2d array, Matrix[i][j], is that when I count the line, the number of count will be the 'i'? How about 'j'? Am I need to count i and j before put the data into 2d array?
    Do correct me if something wrong in:
    while( reader.readLine() != null){
    String Matrix[] = line.split(",");
    } Thank you.

    gtt0402 wrote:
    while( reader.readLine() != null){
    String Matrix[] = line.split(",");
    How about:
    ArrayList<String[]> rows = new ArrayList<String[]>();
    while((line = reader.readLine()) != null) {
        rows.add(line.split(","));
    }After the loop you have a list full of String arrays and you can convert it to a 2D String array if you wish.

  • How to put data into a array element in the BPEL

    Hi,
    I have a element in the WSDL which is of type Array. (i.e accepts unlimited data for the same element). How should i put a data into a array in the BPEL.
    Example:
    The below Example gives u an idea about wht iam asking:pasting a piece of my requirement:
    <s:element minOccurs="0" maxOccurs="1" name="parameters" type="tns:ArrayOfCSParameters" />
    <s:complexType name="ArrayOfCSParameters">
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="unbounded"
    name="CSParameters" nillable="true" type="tns:CSParameters" />
    </s:sequence>
    </s:complexType>
    <s:complexType name="CSParameters">
    <s:sequence>
    <s:element minOccurs="0" maxOccurs="1" name="RevenueItem" type="tns:RevenueItem" />
    <s:element minOccurs="0" maxOccurs="1" name="AccountURIs" type="tns:ArrayOfString" />
    <s:element minOccurs="0" maxOccurs="1" name="GroupURIs" type="tns:ArrayOfString" />
    <s:element minOccurs="1" maxOccurs="1" name="Percentage" nillable="true" type="s:decimal" />
    </s:sequence>
    <s:attribute name="Version" type="s:decimal" use="required" />
    <s:attribute name="URI" type="s:string" />
    </s:complexType>
    Any suggestion is appreciated.
    Regards
    pavan

    You have 2 options i guess.
    Use the transformation and the for-each to construct the array-list
    or like Richard said, use a loop in bpel, assign in the loop an variable of element type="CSParameters" and append this variable to your variable with accepts the arraylist.

  • How to take waveform chart data and put it into an array

    Hello all,
    I am new to programming in Labview, and am learning basically by watching youtube video and such. My question is how to take a set of random data that I have written code for and linked to a waveform chart, and put the data into an array so I can calculate the mean of the data set. If there is an easier way to calculate the mean of the data set I am all ears, but I need to be able to display the mean on the front panel each time the code is run. I have attached a file of my code.
    Thanks
    Attachments:
    CA1.vi ‏11 KB

    Welcome.
    If you have not done so, look at the on-line tutorials on Getting Started with LabVIEW on the NI web site.
    A chart has a property known as History which retains some previous values.  You can get access to the the History property by popping up on the block diagram terminal of the chart and selecting Create >> Property Node. Note that the history length can be set via a pop up menu.  The default length is 1024.
    Other comments: When you know the number of iteration in advance you should use a for loop rather than the while loop.
    You can also use an autoindexing tunnel at the boundary of the loop to create an array. It only contains the values from the current run, unlike the chart history which can retain values between runs (as long as the VI remains in memory). Watch the two Mean indicators as you run this VI several times.
    The error wire is to assure that the history property node runs after the loop.  Disconnect the wire and watch the Mean and Mean 2 indicators carefully.
    The Wait is to slow things down a bit so that you can see what is happening.
    Lynn
    Attachments:
    CA1.2.vi ‏11 KB

  • What is the Problem in the way that I get input into an Array

    Hi Guru's,
    Im learning Java and I have written a simple program to get the input and write into an Array. The program is as follows.
    import java.util.*;
    public class ArraysSort {
         public static void main(String[] args)
              System.out.println("Enter the Number of Entries that you want to Enter");
              Scanner num = new Scanner(System.in);
              int len = num.nextInt();
              int arr[] = null;
              System.out.println(len);
              System.out.println("Enter the Numbers");
              for (int i=0;i<len;i++)
    *               *arr[i] = num.nextInt();*
              //System.out.println("The Numbers in Ascending Order are:");
              //Arrays.sort(arr);
              for (int i=0;i<arr.length;i++)
                   System.out.println(arr);
    Can anyone tell me what is wrong with the Way that I get the input. I have marked the statement in Bold for easy identification.
    Thanks a lot for all your help..

    VijaySwaminathan wrote:
    *               *arr[i] = num.nextInt();*I don't think you can just say
    int arr[] = null;and then expect it to insert? Surely first create an array like this....
    int arr[] = new int[len];

  • Input into 2d array table

    code is not right :( will repost.
    Edited by: jettaz on May 24, 2008 3:43 PM
    I have initialized a 14x4 array and filled it myself, while allowing the user to further input 4 more rows if he so wishes.
    The array table is 2d for an inventory, sorted by type and brand.
    try
    plainWrapString = JOptionPane.showInputDialog("Please enter Plain Wrap type:");
    brandAString = JOptionPane.showInputDialog("Enter serial for brand A:");
    brandCString = JOptionPane.showInputDialog("Enter serial for brand C:");
    brandXString = JOptionPane.showInputDialog("Enter serial for brand X:");
    for(rowsInteger = 0; rowsInteger < 14; rowsInteger++)
    if(plainWrapString.equalsIgnoreCase(inventoryArray[rowsInteger][columnInteger]))
    throw new IllegalArgumentException("Duplicate found! Please retry.");
    inventoryArray[rowsInteger][columnInteger] = plainWrapString;First of all, my try... catch statement, doesn't catch even when plainWrapString input is a copy of the already entered data in the array table. I had it working okay, though, before I attempt to get the user tp further input more data corresponding to the plainWrapString's row. I'm not sure if this works for inputting the following data according to brands.
    for (columnInteger = 0; columnInteger < 4; columnInteger ++)
    inventoryArray[rowsInteger][columnInteger] = brandAString;
    columnInteger = 0; // resets columnInteger back to zero to continue filling next
                                // column in array?
    for (columnInteger = 0; columnInteger < 4; columnInteger++)
    inventoryArray[rowsInteger][columnInteger] = brandXString;
    columnInteger = 0;
    for (columnInteger = 0; columnInteger < 4; columnInteger++)
    inventoryArray[rowsInteger][columnInteger] = brandCString;
    selectionDropMenu[rowsInteger] = plainWrapString; // something extra to add to a
                                                                               // drop menu
    catch(IllegalArgumentException error)
    JOptionPane.showMessageDialog(null, error.getMessage());
    }Any help is appreciated :)
    Edited by: jettaz on May 24, 2008 3:46 PM
    Edited by: jettaz on May 24, 2008 4:20 PM

    A HashMap would be a better way to ensure that you have unique elements. This approach will allow you to get away from using exception. I have attached two classes. I have assumed that you only want to store one type, but each type can have many brands. The types will be unique but the brands can be duplicates. The brand object counts the number of duplicate entries. An additional benefit of this approach is that you do not need to know the size of your collection before hand.
    The test class contains the main() method.
    import java.util.HashMap;
    import java.util.Iterator;
    import java.util.Set;
    import java.util.SortedSet;
    import java.util.TreeSet;
    public class TestClass{
         private HashMap<String, Brand> type = new HashMap<String, Brand>();
         public TestClass(){
         public void addTypeAndBrand(String typeName, String brandName){
              Brand b = type.get(typeName);
              if(b==null){
                   type.put(typeName, new Brand(brandName));
              }else{
                   b.addBrand(brandName);
         public void listTypeAndBrand(){
              Set<String> types = type.keySet();
              SortedSet<String> sortedTypes = new TreeSet<String>(types);
              Iterator<String> typeIter = sortedTypes.iterator();
              Brand b = null;
              String typeName = "", brandName = "";
              int frequency=0;
              while(typeIter.hasNext()){
                   typeName = typeIter.next();
                   b = type.get(typeName);
                   Set<String> brands = b.getKeys();
                   SortedSet<String> sortedBrands = new TreeSet<String>(brands);
                   Iterator<String> brandIter = sortedBrands.iterator();
                   while(brandIter.hasNext()){
                        brandName = brandIter.next();
                        frequency = b.getCount(brandName);
                        System.out.println("Type: " + typeName + ",     Brand: " + brandName + ",     Brand Count: " + frequency);
         public static void main(String[] arg){
              TestClass test = new TestClass();
              test.addTypeAndBrand("Japan", "Toyota");
              test.addTypeAndBrand("Japan", "Honda");
              test.addTypeAndBrand("Japan", "Honda");
              test.addTypeAndBrand("USA", "Ford");
              test.addTypeAndBrand("USA", "Chevy");
              test.addTypeAndBrand("USA", "Dodge");
              test.listTypeAndBrand();
    }The Brand class is:
    import java.util.HashMap;
    import java.util.Set;
    public class Brand {
         private HashMap<String, Frequency> brand = new HashMap<String, Frequency>();
         public Brand(String brandName){
              brand.put(brandName, new Frequency());
          * Add brand to HashMap. If brand does not already exist, add brand to HashMap.
          * Otherwise increment count of brand.
          * @param newBrand brand to be added to HashMap
         public void addBrand(String newBrand){
              Frequency freq = brand.get(newBrand);
              if(freq==null){
                   brand.put(newBrand, new Frequency());
              }else{
                   freq.add();
         public Set<String> getKeys(){
              return brand.keySet();
         public int getCount(String key){
              Frequency f = brand.get(key);
              return f.getFrequency();
          * Inner class for frequency counts.
         class Frequency{
              private int total;
              public Frequency(){
                   total = 1;
              public void add(){
                   total++;
              public int getFrequency(){
                   return total;
    }The output I get is:
    Type: Japan, Brand: Honda, Brand Count: 2
    Type: Japan, Brand: Toyota, Brand Count: 1
    Type: USA, Brand: Chevy, Brand Count: 1
    Type: USA, Brand: Dodge, Brand Count: 1
    Type: USA, Brand: Ford, Brand Count: 1

  • Help With Homework Reading user input into an Array

    This program is to read questions from a file and retrieve user input as answers.
    This program is no where near complete, but I am stuck. (I dont know why, maybe its too late at night)
    I have a total of three classes. I am currently stuck in my main class. See Comments ("What the hell am I printing/ Will this work?"). In this next line of code, i need to read the question from the file to the user, and then accept their input.
    Main Class:
        public static void main(String[] args) {
            try {
            Scanner in = new Scanner(new FileReader("quiz.txt"));
                catch (Exception e) {
                System.out.println(e);
            ArrayList <Questions> Questions = new ArrayList<Questions>();
            ArrayList<String> answers = new ArrayList<String>();
                  for (Questions qu : Questions)
             System.out.println(); //What the hell am I printing.
             String answer = in.nextLine(); //Will this work?
             answers.add(answer); //This should work
          }Questions Class:
    public class Questions {
        String Questions = "";
        public String getQuestions() {
            return Questions;
        public void setQuestions(String Questions) {
            this.Questions = Questions;
        public Questions(String Questions)
            this.Questions = Questions;
    }answers class:
    package QuizRunner;
    * @author Fern
    public class answers {
        String answers = "";
        public String addAnswers() {
            return answers;
        public answers(String answers) {
            this.answers = answers;
        }

    doremifasollatido wrote:
    According to standard Java coding conventions, class names should start with a capital letter (so, your "answers" should be "Answers"). And, variable and method names should start with a lowercase letter (so, your "Questions" should be "questions").
    And classnames should (almost) never be plural words. So it should probably be an 'Answer' and something else containing a collection of those objects called 'answers'.
    Also, *your variable name should not be the same (case-sensitive match) as your class name.* Although it will compile if done syntactically correctly, it is highly confusing! I first wrote this because you did this for both "Questions" and "answers" classes in their class definition, but you also used "Questions" as your variable name in 'main'. (Note that applying the standard capitalization conventions will prevent you from using the same name for your class name as for your variable name, since they should start with different cases.)
    Of course having an 'Answer' called 'answer' is often fine.
    Your Questions class should probably be called "Question", anyway--it looks like it should hold a single question. And, your "answers" class should probably be called "Answer"--it looks like it should hold a single answer. You aren't using your "answers" class anywhere right now, anyway.Correct. There might be room for a class containing a collection of Question objects, but it's unlikely such a class would contain just that and nothing else.

  • Transferring User Input Into an Array

    I want the user to input whats inside the matrix so I tell them "Enter Row 1 of Matrix 1: " Say for example they entered the length of the square matrix as 3, I would then want them to enter something like "1 2 3" as Row 1. With my current code I get:
    3 3 3
    3 3 3
    3 3 3
    I cant figure out what I should change so that its:
    1 2 3
    1 2 3
    1 2 3
    Thanks so much for any help. Heres the code so far:
    import java.util.Scanner;
    public class MatrixAddPro
      public static void main (String[] args)
         int row1, col1;
         Scanner scan = new Scanner(System.in);
         System.out.println("Enter the length of the square matrix: ");
         col1 = scan.nextInt(); 
         int[][] a = new int[col1][col1];
         System.out.println("Enter Row 1 of Matrix1: ");
         while(scan.hasNext())
         a[1][1] = scan.nextInt();
         //for (int row = 0; row < a.length; row++)
            //for (int col = 0; col < a[row].length; col++)
               //a[col1][col1] = scan.nextInt();
         for (int row = 0; row < a.length; row++)
            for (int col = 0; col < a[row].length; col++)     
               System.out.print(a[1][1] + "\t");
            System.out.println();  
    }

    import java.util.Scanner;
    public class MatrixAddPro
      public static void main (String[] args)
         int input, row, col;
         Scanner scan = new Scanner(System.in);
         System.out.println("Enter the length of the square matrix: ");
         col = scan.nextInt(); 
         row = col;
         int[][] a = new int[row][col];
         for (int x = 0; x < row; x++)
            for (int y = 0; y < col; y++)
               {System.out.println("Enter Row"+(x+1)+" Col"+ (y+1));
               input = scan.nextInt();
               a[x][y] = input;
         for (int x = 0; x < row; x++)
            for (int y = 0; y < col; y++)     
               {System.out.print(a[x][y] + "\t");
               System.out.println();      
    }OUTPUT:
    Enter the length of the square matrix:
    3
    Enter Row1 Col1
    1
    Enter Row1 Col2
    2
    Enter Row1 Col3
    3
    Enter Row2 Col1
    1
    Enter Row2 Col2
    2
    Enter Row2 Col3
    3
    Enter Row3 Col1
    1
    Enter Row3 Col2
    2
    Enter Row3 Col3
    3
    1
    2
    3
    1
    2
    3
    1
    2
    3
    Alright so now its not printing in rows...
    Thanks for your patience/help guys.

  • How do I put data into a template using the Labview report generation toolkit for Microsoft Office?

    I am running Lookout 5.0 and have recently purchased the Labview Report Generation Toolkit for Microsoft Office to create reports from my Lookout logged data. Since I have never used Labview I am having my problems. I tried following the tutorials but they do not seem to be examples of what I want to do.
    I log rainfall totals (1 spreadsheet)in Lookout from 40 different sites in 5 minute increments. I copy these totals and paste them into another spreadsheet which sums them up to give me hourly totals and then paste those totals into a spreadsheet for distribution.
    In Labview I create a new report and use the distribution sheet as my template, but how do I complete
    the steps of loading the raw 5 minute data into labview and then paste it into the hourly total spreadsheet and then transfer those totals into the distribution template?
    I have been trying to figure this out for over a week, and I am getting nowhere.
    Any response would be appreciated.
    Thanks
    Jason P
    Jason Phillips

    Lookout saves the files in .csv form which can be opened in Excel. I did make some progress by using the "append table to report" vi which allowed me to put values into an array and then those values were entered into my template on my report vi.
    Where I am stuck now is I want to be able to put values into my template from a .csv file, not from an array I have to manually put numbers in.
    Once those values are in my template I want to pull summed values from the template and place them into a final excel file for printing.
    I have attached examples of the files I am working with to help you better understand what I am trying to do.
    I hope that makes sense.
    Jason Phillips
    Attachments:
    HourlyTotalsTemplate.xls ‏120 KB
    eb_rain_gauge_ss.csv ‏23 KB
    EastBankHourlyRainReport.xls ‏28 KB

  • How do I take data from a data grid and put it into a variable?

    I am having problems taking data from a datagrid (guess you got that from the title) and setting it to a variable. I am tak
    ing the data from 3 different rss feeds, depending on what button you press, and showing it in a grid. I would like to be able to do more with this data. Here is my code so far:
    <mx:VBox id="vbox" x="70" y="150">
      <mx:Label text="This Data Grid is doing nothing" />
      <mx:DataGrid width="1000" dataProvider="{fullXML}">
       <mx:columns>
        <mx:DataGridColumn id="dataGrid" *dataField="channel.description" headerText="Feed"/>
       </mx:columns>
      </mx:DataGrid>
    </mx:VBox>
    <!-- from test 5 -->
    <mx:Move id="moved" target="{hbox}" repeatCount="0" easingFunction="mx.effects.easing.Linear.easeIn" />
    <mx:HBox id="hbox" fontSize="12" fontFamily="courier">
      <mx:Label text="{website**}" />
    </mx:HBox>
    * this is the data I want to get out
    ** this is where I want to be able to put the variable.
    I don't know if I can do it here or if I need a function or what.
    I would like to be able to put it into an array, but step one is anything at all, so I'm trying just a variable.

    Where do I put that line of code? I see that it goes at the Script part near the top, but how can I use that, I am pretty new to this language. I am not familiar with this line, where does it bind the value from the datagrid to the variable?
    fullXML[myDataGrid.selectedIndex].FIELD_NAME;
    myDataGrid would be the id from the grid I am guessing?
    and selected index would be the channel.description part?
    and FIELD_NAME; is the variable name?
    does this go into a funtion or is it placed at the top where the variables are declared?

  • How do I insert into an array only if the condition is true?

    I am buiding an array made up of pairs of data from a file. I am going through line by line putting the values in an array and then taking the pairs of two indexes oring them and putting the number into another array. I do not know if there is more than one set on each line so I have to do a while loop to check.The problem is I have to get the indexes in pairs, so for example I take in the element from index 0 and 1 and or them index 2 and 3 and or them, I do not need the combination of 1 and 2 or 3 and 4 and etc. I am using the "Quotient & Remainder" to check if the index is even or odd, if it is even I take that element and the very next index's element, I or them and put them in another array, but if i
    t is odd I do not want to put anything into the array. How can I go about doing that? Any help would be appreciated. I am using version 6.1 Thanks, Molly
    Attachments:
    labview.bmp ‏3841 KB

    Molly,
    Rather than running while loop which only executes code every other time you could instead just do a little more math to get your index values. Just multiply the iterator (i) terminal by 2 for the first index and then add 1 to it for the second (you'd need to run the loop half as many times of course). This would be more efficient and easier to read in your code. One other tip is that when you are running a loop a specified number of times it's cleaner to use a for loop rather than a while loop.
    Regards,
    Ryan K.
    NI

  • Taking pieces of a signal and putting them in an array

    Lets say I have a square wave in a large array (1X#samples). I want to
    put the values of each positive part of the square wave into an array
    such that its size is #positivepulses X #samplesperpulse. The only
    thing that I know for certain about the square wave is that the
    non-positive parts of the signal are zero.
    Any suggestions for how I might achieve this?
    Sent via Deja.com http://www.deja.com/
    Share what you know. Learn what you don't.

    use the java.util.Scanner class.
    read in the file. loop through the lines to get the numbers and put them into an array and/or add them.
    this is something you could have easily looked up on your own. if not in google, then definitely within these forums.

  • A simple question about putting something into a double

    Hi, I am trying to write a program that takes a numerical form of the date (IE. 1/31 or 4/22) and have to output it so that is says January 31, or March 22. My question is, is it possible to put that into an array or a double, and ignore the /? I have it set up so it works as a string, but I can't figure out how to do it with a double.

    You mean ask the user to put them in seperatly like this?
    System.out.println("Enter month");
    month = keyboard.nextInt();
    System.out.println("Enter day.");
    day = keyboard.nextInt();
    That works, but I want to be able to break up the string 2/22 and store the 2 in an int, and the 22 in an int. I can't figure out how to do it. I figured out how to store a single number, like the first 2. What I did is use the charAt command on the string, and then typecast it into a int, but how would you do it for the 22, or and 11 and such?
    for the record, here is how i did the char thing.
    char d1;
    d1 = numDate.charAt(3);
    day = (int)d1;

  • Loading file of BMPs into one array

    Hi, 
    For some reason I am having trouble loading a batch of BMP files into one 2D array.  I have attached the VI I have been messing with for some time now... (as well as a couple sample BMPs if someone wants them)
    I want to take each BMP in a folder, extract the 2D array and put it into one array.  Each new image's 2D array goes on the row after the previous image.
    Any help for this seemingly simple problem?
    Solved!
    Go to Solution.
    Attachments:
    loadBMPs.vi ‏13 KB
    DataBMP.zip ‏3 KB

    1) You are correctly finding the filenames... but what are you doing with the single path? That's only going to store the last one in the loop... and you don't connect it to the BMP vi. 
    2) You should just do everything in the for loop. 

Maybe you are looking for

  • How can i convert my (music playing) docking station from an iphone 4 to an iphone 6?

    Hello, I own a dockingstation which allows me to play music from my phone and recharge it when it's plugged in, it plugs in where you would normally plug in your recharger. Since it is for an iphone 4 and i own an iphone 6, is there someting to conve

  • When i try to run Dreamweaver CC i always get an error.

    When i try to run Dreamweaver CC i always get an error on : ?PeekUTF32@WREncodingMap@@QEBPBIXZ. This started after i switch the WRServices.dll, when i was getting one other error. And no one answered me on the phone service.

  • List item (TList) in Form9iDS

    Dear expert, I've some question with the list item (TList) in Form9i. When I retrive list element as follows : Ashton Been Brown Charle Jack Tom Why i press key "J" but the select hilight not go to "Jack"? What's wrong ??? But when I'm try in Form6i

  • What is a screen shot

    I read about people taking screen shots by holding down the sleep and home buttons for a second, but what is a screen shot?

  • Help! Deleting Photos in Aperature also deleted in iPhoto

    I have recently started using Aperture and I want to use it with my "professional" photos and continue to use iPhoto for my "personal" photos. I already had a lot of professional photos in iPhoto, so I decided that the easiest way to bring the ones I