restructing of the data_retrieve_scripts