public double getValue(String fromCountry, String toCountry, double amount) {
    loadData();

    if (fromCountry.equals(result.getBase())) {
      double temp = Double.parseDouble((result.getRates().get(toCountry)));

      return (temp * amount);
    } else if (toCountry.equals(result.getBase())) {
      double temp = Double.parseDouble((result.getRates().get(fromCountry)));
      return amount / temp;
    } else {
      double c1 = Double.parseDouble((result.getRates().get(fromCountry)));
      double c2 = Double.parseDouble((result.getRates().get(toCountry)));
      double amt = amount / c1;
      return (amt * c2);
    }
  }