Refactor getIndicatorData to take a callback