refactor getData() to getResponse to only depend on variable injection