get_data.R file and refactor