refactored data_collection