refactor loadcurrencydata script