public static String determineBondType(Formula formula) {
    
    List<String> elements = formula.getElements();
    List<String> elementTypes = new ArrayList<String>();
    for (String element : elements) {
      elementTypes.add(typeList.get(element));
    }
    String bondType = null;
    if (elementTypes.contains("Hydrogen") && elements.size() <= 2) {
      bondType = "hydrogen";
      return bondType;
    }
    if (elementTypes.contains("Metal") && elementTypes.contains("Nonmetal")) {
      bondType = "ionic";
    } else if(elementTypes.contains("Metal") && !elementTypes.contains("Nonmetal")) {
      bondType = "metallic";
    } else if(elementTypes.contains("Nonmetal")&& !elementTypes.contains("Metal")) {
      bondType = "covalent";
    }
    return bondType;

  }