Removed testing code from upload_data