moved getData.R to global.R