implement getData changes in js snippet